import request from '@/utils/request'
import qs from 'qs'

export function getUserList(params) {
  return request({
    url: '/User/userAdmin',
    method: 'get',
    params
  })
}

export function getUserDetail(params) {
  return request({
    url: '/User/userAdminDetail',
    method: 'get',
    params
  })
}

export function login(data) {
  return request({
    url: '/user/login',
    method: 'post',
  })
}

export function register(data) {
  return request({
    url: '/user/register',
    method: 'post',
    data
  })
}

export function modifyUserInfo(data) {
  return request({
    url: '/User/modifyUserInfo',
    method: 'post',
    // headers: {
    //   'Content-Type': 'application/x-www-form-urlencoded'
    // },
    data
  })
}

export function getInfo(token) {
  return Promise.resolve()
}

export function logout() {
  return Promise.resolve()
}
